<?php
/**
 * ebiz front
 * 
 * Marketing Controller
 *  
 * @author allen
 *  
 */
//require_once 'BaseController.php';

require_once '../app/core/controllers/BaseController.php';
require_once '../app/services/MarketingService.php';
require_once '../app/core/utils/HttpUtil.class.php';

class MarketingController extends BaseController 
{
	    
    public function index($param = array()){ 
        $key = strtolower(trim($param['key']));
        $marketing = new MarketingService();
        $isValidity = $marketing->isValidity($key);
        if($isValidity){
        	header("Location: ".$isValidity);
        }else{
        	HttpUtil::redirect404();       	
        }
        exit();
    }

}





